
<!--
 * @Description: 配置租户产品 - 设置生效时间弹出框
 * @Author: 马山
 * @Date: 2020-03-30 15:36:26
 * @LastEditTime: 2020-03-30 12:43:55
 * @LastEditors: 马山
 -->

<template>

<el-dialog title="设置生效时间" :close-on-click-modal="false" :visible="isShow" append-to-body class="serviceConfigDialog" @close="closeDialog" :width="'400px'">

    <div class="serviceConfigContent">
        <el-form ref="modifyForm" v-model="currentRowData" label-position="left" label-width="110px" size="mini" >
            
            <el-form-item label="服务名称：" >
                <el-input v-model="currentRowData.serviceName" clearable disabled></el-input>
            </el-form-item>
            <el-form-item label="生效时间：" class="">
                <el-date-picker size="mini" 
                v-model="currentRowData.beginDateTamp" 
                format="yyyy-MM-dd HH-mm" 
                value-format="timestamp" 
                type="datetime" clearable>
                </el-date-picker>
            </el-form-item>
        </el-form>
    </div>  

    <div slot="footer" class="dialog-footer">
        <button class="el-button el-button--primary" @click="submit">确 定</button>
        <button class="el-button el-button--info" @click="closeDialog">取 消</button>
    </div>
</el-dialog>
    
</template>

<script>
export default {

name:"serviceConfig-dialog",
components:{},
props:{},
data:() =>({
    isShow:false,
    currentRowData:{},
}),
mounted(){},
methods:{

    //组件入口
    open(data){
        this.isShow = true;
        // let configParams = Object.assign({},data);
        this.currentRowData = JSON.parse(JSON.stringify(data.row));
        this.currentRowData.currentIndex = data.index;
        this.currentRowData.isProduct = data.isProduct;
    },

    submit(){
        this.currentRowData.beginDate = this.currentRowData.beginDateTamp||"";
        this.$emit("submit",this.currentRowData);
        this.closeDialog();
        
    },
    closeDialog(){
        this.isShow = false;
    },



}



}
</script>

<style lang="scss">

.serviceConfigContent{

    .el-form-item{
        margin-bottom:5px!important;
        &.bottom0{
            margin-bottom:5px;  
        }
    }
}


</style>


